The Dreamweaver JavaScript API > Selection functions > dom.setSelection()

 

dom.setSelection()

Availability

Dreamweaver 3.0

Description

Sets the selection in the document.

Arguments

offsetBegin, offsetEnd

The arguments are the begin and end points, respectively, for the new selection, expressed as character offsets into the document's HTML source code. If the two numbers are the same, the new selection is an insertion point. If the new selection is not a valid HTML selection, it is expanded to include the characters in the first valid HTML selection. For example, if offsetBegin and offsetEnd define the range SRC="myImage.gif" within <IMG SRC="myImage.gif">, the selection expands to include the entire IMG tag.

Returns

Nothing.

Enabler

None.